#ifndef _EKOS_EXCEPTION_H_
#define _EKOS_EXCEPTION_H_

#include <inc/types.h>
#include <inc/trap.h>
#include <inc/ips.h>

struct user_xinfo_t
{
     uint16_t level;
     /* user stack pointer in last user exception */
     GPREG_T usp;
};

/* 允许最大的用户异常层数 */
#define XLEVEL_MAX 16

/* for user mode - the definition of user pfhandler */
typedef int(*pfhandler_t)
(struct trapframe_t tf, void *addr, uint32_t err, uint32_t level);

#endif /* _EKOS_EXCEPTION_H_ */
